/*-------------------------------------------------------------------------
 *
 * seqdesc.c
 *	  命令/sequence.c 的 rmgr 描述例程
 *
 * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
 * Portions Copyright (c) 1994, Regents of the University of California
 *
 *
 * IDENTIFICATION
 *	  src/backend/access/rmgrdesc/seqdesc.c
 *
 *-------------------------------------------------------------------------
 */
#include "postgres.h"

#include "commands/sequence.h"


void seq_desc(StringInfo fc_buf, XLogReaderState *fc_record)
{
	char	   *fc_rec = XLogRecGetData(fc_record);
	uint8		fc_info = XLogRecGetInfo(fc_record) & ~XLR_INFO_MASK;
	xl_seq_rec *fc_xlrec = (xl_seq_rec *) fc_rec;

	if (fc_info == XLOG_SEQ_LOG)
		appendStringInfo(fc_buf, "rel %u/%u/%u",
						 fc_xlrec->node.spcNode, fc_xlrec->node.dbNode,
						 fc_xlrec->node.relNode);
}

const char * seq_identify(uint8 fc_info)
{
	const char *fc_id = NULL;

	switch (fc_info & ~XLR_INFO_MASK)
	{
		case XLOG_SEQ_LOG:
			fc_id = "LOG";
			break;
	}

	return fc_id;
}
